<?PHP	
	function getErrorXML()
	{
		$vResult = "<error" . formatXML('code', '1') . ">\n";
		$vResult .= "Login failed";
		$vResult .= "</error>";
		return $vResult;
	}
	
	function getXMLCode($ACode)
	{
		$vResult = "<success" . formatXML('code', $ACode) . ">\n";
		$vResult .= "Operation succeeded";
		$vResult .= "</success>";
		return $vResult;
	}
	
	function formatXML($Name, $Raw)
	{
		$Raw = htmlspecialchars($Raw, ENT_QUOTES);
		return " " . $Name . "=" . "\"" . $Raw ."\""; 
	}
	
	function Trace($Value)
	{
		echo $Value;
		echo '</br>';
	}
	
	function SetCookieLive($name, $value='', $expire = 0, $path = '', $domain='', $secure=false, $httponly=false) 
    { 
        $_COOKIE[$name] = $value; 
        return setcookie($name, $value, $expire, $path, $domain, $secure, $httponly); 
    }
?>